  angular.module('faApp')
  .service('newOrderService', [ 'ajaxService',function (ajaxService) {
  //渠道个人订单集合
this.qdmlist = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("ORDER_QDM_LIST"),cfg || {});
    };

  //渠道所有订单集合
this.qdalist = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("ORDER_QDA_LIST"),cfg || {});
    };

   //产品个人订单集合
this.cpmlist = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("ORDER_CPM_LIST"),cfg || {});
    };

   //产品所有订单集合
this.cpalist = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("ORDER_CPA_LIST"),cfg || {});
    };  

       //财务所有订单集合
this.cwalist = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("ORDER_CWA_LIST"),cfg || {});
    };   

       //财务管理员所有订单集合
this.cwaglylist = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("ORDER_CWA_GLY_LIST"),cfg || {});
    };   


//产品负责人
this.querycpfzr = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("PRODUCT_FZR_LIST"),cfg || {});
    };

//订单修改
this.updateOrderStatusAndOther = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("ORDER_CHANGE_BY_STATUS"),cfg || {});
};

//查询订单详情
this.queryOrderXiangqing = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("ORDER_XIANGQING"),cfg || {});
    };

    //20170731 调用lisu提供的订单详情
this.queryOrderDetail = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("ORDER_DTAIL"),cfg || {});
    };

//查询合同详情
this.queryOrderContract = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("ORDER_CONTRACT_DETAIL"),cfg || {});
    };

    //查询合同编辑
this.orderContractUpdate = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("ORDER_CONTRACT_EDIT"),cfg || {});
    };

//查询财务订单详情
this.queryCWOrderXiangqing = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("ORDER_CWA_VIEW"),cfg || {});
    };

    this.listByProId = function (cfg,id) {
      cfg.oProjectId=id;
      return ajaxService.jsonp(ajaxService.getApiUri("ORDER_PROID_LIST"),cfg || {});
    }; 
    
    this.query = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("ORDER_QUERY"),cfg || {});
    };  

    this.edit = function (cfg) {
      return ajaxService.jsonp(ajaxService.getApiUri("ORDER_EDIT_STATUS"),cfg || {});
    };  
    
    this.updateDefriendStatus = function (cfg) {
      return ajaxService.jsonp(ajaxService.getApiUri("ORDER_EDIT_DEFRIENDSTATUS"),cfg || {});
    };  
    this.queryOrderList=function(cfg){
      return ajaxService.post(ajaxService.getApiUri("ORDER_FOLLOW_UP_LIST") ,cfg || {});
    } 

}]);
 



